#include <stdio.h>

/* 
 * If this prototype is provided, the compiler will catch the error 
 * in main(). If it is omitted, then the error may go unnoticed.
 */
int fac(int n);              /* Prototype */

int main(void) {             /* Calling function */
//    printf("%d\n", fac());   /* Error: forgot argument to fac */
    printf("%d\n", fac(0));   /* Error: forgot argument to fac */

    return 0;
}

int fac(int n) {             /* Called function  */
    if (n == 0) 
        return 1;
    else 
        return n * fac(n - 1);
}

